<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />

	<!-- blueprint CSS framework -->
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" />
	<!--[if lt IE 8]>
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />
	<![endif]-->

	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" />
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />

	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head>

<body>

<div class="container" id="page">

	<div id="header">
            <div id="logo"><?php echo CHtml::image(Yii::app()->request->baseUrl."/images/logo.png"); ?></div>
	</div><!-- header -->

	<div id="mainMbMenu">
		<?php 
                
                $this->widget('application.extensions.mbmenu.MbMenu',array(
                    'items'=>array(
                        array('label'=>'Inicio','url'=>array('/site/index')),
                        array('label'=>'Trámites',
                            'items'=>array(
                                array('label'=>'Ciudadanos','url'=>array('/consulta/publico')),
                                array('label'=>'Interno','url'=>array('/consulta/privado')),
                            ),                         
                        ),
                        array('label'=>'Reportes Pantalla',
                            'items'=>array(
                                array('label'=>'General','url'=>array('/Reporte/General')),
                                array('label'=>'Por Flujos y Estados','url'=>array('/Reporte/DocumentoFlujo')),
                                array('label'=>'Por Usuario','url'=>array('/Reporte/DocumentoUsuario')),
                                array('label'=>'Por Departamento','url'=>array('/Reporte/DocumentoDepartamento')),
                                array('label'=>'Por Prioridad','url'=>array('/Reporte/DocumentoPrioridad')),
                            ),                              
                        ),
                        array('label'=>'Excel',
                            'items'=>array(
                                array('label'=>'General','url'=>array('/Excel/General')),
                                array('label'=>'Por Flujos y Estados','url'=>array('/Excel/DocumentoFlujo')),
                                array('label'=>'Por Usuario','url'=>array('/Excel/DocumentoUsuario')),
                                array('label'=>'Por Departamento','url'=>array('/Excel/DocumentoDepartamento')),
                                array('label'=>'Por Prioridad','url'=>array('/Excel/DocumentoPrioridad')),
                            ),                              
                        ),
                        array('label'=>'Alertas'),
                        array('label'=>'Estadísticas',
                            'items'=>array(
                                array('label'=>'Por Usuarios','url'=>array('/estadistica/Usuario')),
                                array('label'=>'Por Departamentos','url'=>array('/estadistica/Departamento')),
                            )),
                        
                        array('label'=>'Usuarios',
                            'items'=>array(
                                array('label'=>'Nuevo Usuario','url'=>array('/user/admin/create')),
                                array('label'=>'Listado de Usuarios','url'=>array('/user')),
                                array('label'=>'Gestión de Usuario','url'=>array('/rights/assignment')),
                                array('label'=>'Gestión de Permisos','url'=>array('/rights/authItem/permissions')),      
                                array('label'=>'Gestión de Roles','url'=>array('/rights/authItem/roles')),                                      
                                array('label'=>'Gestión de Tareas','url'=>array('/rights/authItem/tasks')),     
                                array('label'=>'Gestión de Operaciones','url'=>array('/rights/authItem/operations')),                                     
                            ),                              
                        ),                 
                        array('label'=>'Login', 'url'=>array('/site/login'),'visible'=>Yii::app()->user->isGuest), 
                        array('label'=>'Cerrar Sesión ('.Yii::app()->user->name.')','url'=>array('/site/logout'),'visible'=>!Yii::app()->user->isGuest)
                    )
                ));              
                ?>
	</div><!-- mainmenu -->
	<?php if(isset($this->breadcrumbs)):?>
		<?php $this->widget('zii.widgets.CBreadcrumbs', array(
			'links'=>$this->breadcrumbs,
		)); ?><!-- breadcrumbs -->
	<?php endif?>

	<?php echo $content; ?>

	<div class="clear"></div>

	<div id="footer">
		Copyright &copy; <?php echo date('Y'); ?> <br/>
		<?php echo CHtml::link('Technopark - Ecuador Technology Park S.A.', 'http://www.technology-park.com') ?>
	</div><!-- footer -->

</div><!-- page -->

</body>
</html>
